<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    var age = prompt('请输入年龄')
    try{
        //alert(aaa);
        if (age>1000){
            //alert('有错误')
            throw new Error('1')
        }
        if (age<0){
            //alert('有错误')
            throw new Error('2')
        }
    }catch (e){
//        console.log("有个错误"+e);
        console.log(e);
//        age = 10;
    } finally {
        console.log("最终的")
    }

    alert(age);
    alert('hello');
</script>
</body>
</html>